﻿using System;
using FunctionalCLR;
using FunctionalCLR.Core;

namespace FunctionalCLR.Shell {
    public class VariableNode : IdentifierNode {

        public IContext Context {
            get;
            set;
        }

        public Variable Variable {
            get;
            set;
        }

        public override object Evaluate() {
            return this.Variable.Value;
        }

        public override object Accept(IVisitor visitor) {
            return visitor.Visit(this);
        }
    }
}
